\CUSLibraryDelayedUntil{tcolorbox}
\CUSProvideLibrary{tcb}{\cus@d@te}{\cus@versi@n}{tcolorbox}

\tcbset{new/with counter/.code={\edef\kvtcb@new@counter{#1}%
    \let\tcb@proc@counter\tcb@proc@counter@with},
  new/with counter from/.code={\edef\kvtcb@new@counter{\csname tcb@cnt@#1\endcsname}%
    \let\tcb@proc@counter\tcb@proc@counter@from}}
\def\tcb@proc@counter@with#1{%
  \csxdef{tcb@cnt@#1}{\kvtcb@new@counter}%
  \global\csletcs{thetcb@cnt@#1}{the\kvtcb@new@counter}%
  \appto\tcb@new@colopt{,code={\letcs\tcbcounter{tcb@cnt@#1}\letcs\thetcbcounter{thetcb@cnt@#1}}}%
}

\ExplSyntaxOn
\keys_define:nn { cus/frame }
  {
    tcbox-frame  .meta:n = { frame  = { \tcbox [{#1}] } } ,
    tcbox-frame .default:n = { } ,
    tcbox-first  .meta:n = { first  = { \tcbox [{#1}] } } ,
    tcbox-first .default:n = { } ,
    tcbox-middle .meta:n = { middle = { \tcbox [{#1}] } } ,
    tcbox-middle .default:n = { } ,
    tcbox-last   .meta:n = { last   = { \tcbox [{#1}] } } ,
    tcbox-last .default:n = { } ,
    tcbox-whole  .meta:n = { whole  = { \tcbox [{#1}] } } ,
    tcbox-whole .default:n = { } ,
  }